import { connect } from 'react-redux'
import SelectPay from '../../../views/Shop/SelectPay'

function mapStateToProps(state: any) {
    return {
        userInfo: state.user.userInfo,
        order: state.beans.order,
        wxInfo: state.user.wxInfo,

    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        'SET_DETAIL_CART': (data: any) => {
            dispatch({ type: 'SET_DETAIL_CART', data })
        },
        'SET_USER_ORDER_INDEX': (data: number) => {
            dispatch({ type: 'SET_USER_ORDER_INDEX', data })
        },
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(SelectPay)